<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <form>
        <input type="text" name="username" placeholder="请输入用户名">
        <input type="password" name="password" placeholder="请输入密码">
        <input type="button" value="提交">
    </form>
    <span></span>

    <script src="./public/jquery/dist/jquery.min.js"></script>
    <script>
        console.log($('input[type="button"]'))
        $('input[type="button"]').on('click', function () {
            let data = $('form').serialize()
            $.ajax({
                type: 'get',
                url: '/adduser',
                data: data,
                success: function (result) {
                    $('span').innerHTML = result.username + '----' + result.password
                }
            })
        })
    </script>
</body>

</html>